class BootStrapForm(object):
    def __init__(self,*args,**kwargs):
        super().__init__(*args,**kwargs)
        #fields是拿到上面所有的字段,items是访问字典的格式
        for name ,field in self.fields.items():
            field.widget.attrs['class']='form-control'
            field.widget.attrs['placeholder'] = '请输入%s'%(field.label)